﻿--------------------------------------------------------------------------------
-----------------------------------UIFreeScale----------------------------------
-------------------------written by Flup @EU-Rexxar-----------------------------
-------------------------------------v0.9-------------------------------------------

local frame = CreateFrame("Frame")
frame:RegisterEvent("BANKFRAME_OPENED")
frame:RegisterEvent("TRADE_SKILL_SHOW")
frame:RegisterEvent("GUILDBANKFRAME_OPENED")
frame:RegisterEvent("MAIL_INBOX_UPDATE")
frame:RegisterEvent("TAXIMAP_OPENED")
frame:RegisterEvent("TRADE_SHOW")


--GUI--

local guiFrame  =  CreateFrame("Frame","UIFreeScaleGui",UIParent)
guiFrame:SetWidth(400)
guiFrame:SetScale(0.9)
guiFrame:SetHeight(500)
guiFrame:EnableMouse(true)
guiFrame:SetMovable(true)
guiFrame:SetUserPlaced(true)
guiFrame:RegisterForDrag("LeftButton")
guiFrame:SetScript("OnDragStart", function() this:StartMoving() end)
guiFrame:SetScript("OnDragStop", function() this:StopMovingOrSizing() end)
guiFrame:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
guiFrame:SetBackdropColor(0.0,0.0,0.0,0.8)
guiFrame:ClearAllPoints()
guiFrame:SetPoint("CENTER",UIParent)
guiFrame:Hide()



closebutton = CreateFrame("Button", nil, guiFrame)
closebutton.owner = self
closebutton:SetWidth(20)
closebutton:SetHeight(20)
closebutton:SetPoint("TOPRIGHT", guiFrame, "TOPRIGHT", 0, 0)
frame.closebutton = closebutton

local t = closebutton:CreateTexture()
t:SetWidth(20)
t:SetHeight(20)
t:SetPoint("CENTER", closebutton, "CENTER")
t:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up")
t:SetTexCoord(0, 0.625, 0, 0.6875)
closebutton:SetNormalTexture(t)

t = closebutton:CreateTexture(nil, "BACKGROUND")
t:SetTexture("Interface\\Buttons\\UI-Panel-Button-Down")
t:SetTexCoord(0, 0.625, 0, 0.6875)
t:SetAllPoints(closebutton)
closebutton:SetPushedTexture(t)

t = closebutton:CreateTexture()
t:SetTexture("Interface\\Buttons\\UI-Panel-Button-Highlight")
t:SetTexCoord(0, 0.625, 0, 0.6875)
t:SetAllPoints(closebutton)
t:SetBlendMode("ADD")
closebutton:SetHighlightTexture(t)

closebuttontext = closebutton:CreateFontString(nil,"OVERLAY")
closebuttontext:SetFontObject(GameFontHighlight)
closebuttontext:SetText("X")
closebuttontext:SetAllPoints(closebutton)

 closebutton:SetScript("OnMouseUp", function() eframe=0; guiFrame:Hide() end) 
 
apbutton = CreateFrame("Button", nil, guiFrame)
apbutton.owner = self
apbutton:SetWidth(100)
apbutton:SetHeight(32)
apbutton:SetScale(0.8)
apbutton:SetPoint("BOTTOM", guiFrame, "BOTTOM", 130, 10)
frame.apbutton = apbutton
 
local t2 = apbutton:CreateTexture()
t2:SetWidth(100)
t2:SetHeight(32)
t2:SetPoint("CENTER",apbutton, "CENTER")
t2:SetTexture("Interface\\Buttons\\UI-Panel-Button-Up")
t2:SetTexCoord(0, 0.625, 0, 0.6875)
apbutton:SetNormalTexture(t2)

t2 = apbutton:CreateTexture(nil, "BACKGROUND")
t2:SetTexture("Interface\\Buttons\\UI-Panel-Button-Down")
t2:SetTexCoord(0, 0.625, 0, 0.6875)
t2:SetAllPoints(apbutton)
apbutton:SetPushedTexture(t2)

t2 = apbutton:CreateTexture()
t2:SetTexture("Interface\\Buttons\\UI-Panel-Button-Highlight")
t2:SetTexCoord(0, 0.625, 0, 0.6875)
t2:SetAllPoints(apbutton)
t2:SetBlendMode("ADD")
apbutton:SetHighlightTexture(t2)

apbuttontext = apbutton:CreateFontString(nil,"OVERLAY")
apbuttontext:SetFontObject(GameFontHighlight)
apbuttontext:SetText("Apply")
apbuttontext:SetAllPoints(apbutton)
apbutton:SetScript("OnMouseUp", function () SetIt() end )
 
 

local fsdesc_f = guiFrame:CreateFontString(nil,"OVERLAY")
fsdesc_f:SetFontObject("GameFontNormal")
fsdesc_f:SetHeight(10)
fsdesc_f:SetWidth(120)
fsdesc_f:SetText("Frame Name")
fsdesc_f:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-10)

local fsdesc_s = guiFrame:CreateFontString(nil,"OVERLAY")
fsdesc_s:SetFontObject("GameFontNormal")
fsdesc_s:SetHeight(30)
fsdesc_s:SetWidth(130)
fsdesc_s:SetText("Frame Scale (0.1 - 2.0; Standard 1.0)")
fsdesc_s:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",110,-5)

local fsdesc_a = guiFrame:CreateFontString(nil,"OVERLAY")
fsdesc_a:SetFontObject("GameFontNormal")
fsdesc_a:SetHeight(30)
fsdesc_a:SetWidth(130)
fsdesc_a:SetText("Frame Alpha (0.1 - 1.0; Standard 1.0)")
fsdesc_a:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",240,-5)

local fs1 = guiFrame:CreateFontString(nil,"OVERLAY")
fs1:SetFontObject("GameFontNormal")
fs1:SetHeight(10)
fs1:SetWidth(120)
fs1:SetText("Friends Frame")
fs1:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-60)

local fs1_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs1_s_inbox:SetWidth(30)
fs1_s_inbox:SetScale(0.9)
fs1_s_inbox:SetHeight(10)
fs1_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -65)
fs1_s_inbox:SetMaxLetters(3)
fs1_s_inbox:EnableKeyboard(true)
fs1_s_inbox:SetFontObject("GameFontNormal")
fs1_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs1_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs1_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs1_a_inbox:SetWidth(30)
fs1_a_inbox:SetScale(0.9)
fs1_a_inbox:SetHeight(10)
fs1_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -65)
fs1_a_inbox:SetMaxLetters(3)
fs1_a_inbox:EnableKeyboard(true)
fs1_a_inbox:SetFontObject("GameFontNormal")
fs1_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs1_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)


local fs2 = guiFrame:CreateFontString(nil,"OVERLAY")
fs2:SetFontObject("GameFontNormal")
fs2:SetHeight(10)
fs2:SetWidth(120)
fs2:SetText("Charakter Frame")
fs2:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-90)

local fs2_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs2_s_inbox:SetWidth(30)
fs2_s_inbox:SetScale(0.9)
fs2_s_inbox:SetHeight(10)
fs2_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -100)
fs2_s_inbox:SetMaxLetters(3)
fs2_s_inbox:EnableKeyboard(true)
fs2_s_inbox:SetFontObject("GameFontNormal")
fs2_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs2_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs2_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs2_a_inbox:SetWidth(30)
fs2_a_inbox:SetScale(0.9)
fs2_a_inbox:SetHeight(10)
fs2_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -100)
fs2_a_inbox:SetMaxLetters(3)
fs2_a_inbox:EnableKeyboard(true)
fs2_a_inbox:SetFontObject("GameFontNormal")
fs2_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs2_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs3 = guiFrame:CreateFontString(nil,"OVERLAY")
fs3:SetFontObject("GameFontNormal")
fs3:SetHeight(10)
fs3:SetWidth(120)
fs3:SetText("Talent Frame")
fs3:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-120)

local fs3_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs3_s_inbox:SetWidth(30)
fs3_s_inbox:SetScale(0.9)
fs3_s_inbox:SetHeight(10)
fs3_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -135)
fs3_s_inbox:SetMaxLetters(3)
fs3_s_inbox:EnableKeyboard(true)
fs3_s_inbox:SetFontObject("GameFontNormal")
fs3_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs3_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs3_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs3_a_inbox:SetWidth(30)
fs3_a_inbox:SetScale(0.9)
fs3_a_inbox:SetHeight(10)
fs3_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -135)
fs3_a_inbox:SetMaxLetters(3)
fs3_a_inbox:EnableKeyboard(true)
fs3_a_inbox:SetFontObject("GameFontNormal")
fs3_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs3_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs4 = guiFrame:CreateFontString(nil,"OVERLAY")
fs4:SetFontObject("GameFontNormal")
fs4:SetHeight(10)
fs4:SetWidth(120)
fs4:SetText("Raidinfo Frame")
fs4:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-150)

local fs4_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs4_s_inbox:SetWidth(30)
fs4_s_inbox:SetScale(0.9)
fs4_s_inbox:SetHeight(10)
fs4_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -168)
fs4_s_inbox:SetMaxLetters(3)
fs4_s_inbox:EnableKeyboard(true)
fs4_s_inbox:SetFontObject("GameFontNormal")
fs4_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs4_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs4_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs4_a_inbox:SetWidth(30)
fs4_a_inbox:SetScale(0.9)
fs4_a_inbox:SetHeight(10)
fs4_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -168)
fs4_a_inbox:SetMaxLetters(3)
fs4_a_inbox:EnableKeyboard(true)
fs4_a_inbox:SetFontObject("GameFontNormal")
fs4_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs4_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs5 = guiFrame:CreateFontString(nil,"OVERLAY")
fs5:SetFontObject("GameFontNormal")
fs5:SetHeight(10)
fs5:SetWidth(120)
fs5:SetText("Menu Frame")
fs5:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-180)

local fs5_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs5_s_inbox:SetWidth(30)
fs5_s_inbox:SetScale(0.9)
fs5_s_inbox:SetHeight(10)
fs5_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -202)
fs5_s_inbox:SetMaxLetters(3)
fs5_s_inbox:EnableKeyboard(true)
fs5_s_inbox:SetFontObject("GameFontNormal")
fs5_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs5_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs5_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs5_a_inbox:SetWidth(30)
fs5_a_inbox:SetScale(0.9)
fs5_a_inbox:SetHeight(10)
fs5_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -202)
fs5_a_inbox:SetMaxLetters(3)
fs5_a_inbox:EnableKeyboard(true)
fs5_a_inbox:SetFontObject("GameFontNormal")
fs5_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs5_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs6 = guiFrame:CreateFontString(nil,"OVERLAY")
fs6:SetFontObject("GameFontNormal")
fs6:SetHeight(10)
fs6:SetWidth(120)
fs6:SetText("LFG Frame")
fs6:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-210)

local fs6_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs6_s_inbox:SetWidth(30)
fs6_s_inbox:SetScale(0.9)
fs6_s_inbox:SetHeight(10)
fs6_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -235)
fs6_s_inbox:SetMaxLetters(3)
fs6_s_inbox:EnableKeyboard(true)
fs6_s_inbox:SetFontObject("GameFontNormal")
fs6_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs6_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs6_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs6_a_inbox:SetWidth(30)
fs6_a_inbox:SetScale(0.9)
fs6_a_inbox:SetHeight(10)
fs6_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -235)
fs6_a_inbox:SetMaxLetters(3)
fs6_a_inbox:EnableKeyboard(true)
fs6_a_inbox:SetFontObject("GameFontNormal")
fs6_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs6_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs7 = guiFrame:CreateFontString(nil,"OVERLAY")
fs7:SetFontObject("GameFontNormal")
fs7:SetHeight(10)
fs7:SetWidth(120)
fs7:SetText("Spellbook Frame")
fs7:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-240)

local fs7_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs7_s_inbox:SetWidth(30)
fs7_s_inbox:SetScale(0.9)
fs7_s_inbox:SetHeight(10)
fs7_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -267)
fs7_s_inbox:SetMaxLetters(3)
fs7_s_inbox:EnableKeyboard(true)
fs7_s_inbox:SetFontObject("GameFontNormal")
fs7_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs7_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs7_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs7_a_inbox:SetWidth(30)
fs7_a_inbox:SetScale(0.9)
fs7_a_inbox:SetHeight(10)
fs7_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -267)
fs7_a_inbox:SetMaxLetters(3)
fs7_a_inbox:EnableKeyboard(true)
fs7_a_inbox:SetFontObject("GameFontNormal")
fs7_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs7_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs8 = guiFrame:CreateFontString(nil,"OVERLAY")
fs8:SetFontObject("GameFontNormal")
fs8:SetHeight(10)
fs8:SetWidth(120)
fs8:SetText("Questlog Frame")
fs8:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-270)

local fs8_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs8_s_inbox:SetWidth(30)
fs8_s_inbox:SetScale(0.9)
fs8_s_inbox:SetHeight(10)
fs8_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -300)
fs8_s_inbox:SetMaxLetters(3)
fs8_s_inbox:EnableKeyboard(true)
fs8_s_inbox:SetFontObject("GameFontNormal")
fs8_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs8_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs8_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs8_a_inbox:SetWidth(30)
fs8_a_inbox:SetScale(0.9)
fs8_a_inbox:SetHeight(10)
fs8_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -300)
fs8_a_inbox:SetMaxLetters(3)
fs8_a_inbox:EnableKeyboard(true)
fs8_a_inbox:SetFontObject("GameFontNormal")
fs8_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs8_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs9 = guiFrame:CreateFontString(nil,"OVERLAY")
fs9:SetFontObject("GameFontNormal")
fs9:SetHeight(10)
fs9:SetWidth(120)
fs9:SetText("Bank Frame")
fs9:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-300)

local fs9_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs9_s_inbox:SetWidth(30)
fs9_s_inbox:SetScale(0.9)
fs9_s_inbox:SetHeight(10)
fs9_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -333)
fs9_s_inbox:SetMaxLetters(3)
fs9_s_inbox:EnableKeyboard(true)
fs9_s_inbox:SetFontObject("GameFontNormal")
fs9_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs9_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs9_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs9_a_inbox:SetWidth(30)
fs9_a_inbox:SetScale(0.9)
fs9_a_inbox:SetHeight(10)
fs9_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -333)
fs9_a_inbox:SetMaxLetters(3)
fs9_a_inbox:EnableKeyboard(true)
fs9_a_inbox:SetFontObject("GameFontNormal")
fs9_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs9_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs10 = guiFrame:CreateFontString(nil,"OVERLAY")
fs10:SetFontObject("GameFontNormal")
fs10:SetHeight(10)
fs10:SetWidth(120)
fs10:SetText("Crafting Frame")
fs10:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-330)

local fs10_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs10_s_inbox:SetWidth(30)
fs10_s_inbox:SetScale(0.9)
fs10_s_inbox:SetHeight(10)
fs10_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -370)
fs10_s_inbox:SetMaxLetters(3)
fs10_s_inbox:EnableKeyboard(true)
fs10_s_inbox:SetFontObject("GameFontNormal")
fs10_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs10_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs10_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs10_a_inbox:SetWidth(30)
fs10_a_inbox:SetScale(0.9)
fs10_a_inbox:SetHeight(10)
fs10_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -370)
fs10_a_inbox:SetMaxLetters(3)
fs10_a_inbox:EnableKeyboard(true)
fs10_a_inbox:SetFontObject("GameFontNormal")
fs10_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs10_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs11 = guiFrame:CreateFontString(nil,"OVERLAY")
fs11:SetFontObject("GameFontNormal")
fs11:SetHeight(10)
fs11:SetWidth(120)
fs11:SetText("Guild Bank")
fs11:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-360)

local fs11_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs11_s_inbox:SetWidth(30)
fs11_s_inbox:SetScale(0.9)
fs11_s_inbox:SetHeight(10)
fs11_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -403)
fs11_s_inbox:SetMaxLetters(3)
fs11_s_inbox:EnableKeyboard(true)
fs11_s_inbox:SetFontObject("GameFontNormal")
fs11_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs11_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs11_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs11_a_inbox:SetWidth(30)
fs11_a_inbox:SetScale(0.9)
fs11_a_inbox:SetHeight(10)
fs11_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -403)
fs11_a_inbox:SetMaxLetters(3)
fs11_a_inbox:EnableKeyboard(true)
fs11_a_inbox:SetFontObject("GameFontNormal")
fs11_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs11_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs12 = guiFrame:CreateFontString(nil,"OVERLAY")
fs12:SetFontObject("GameFontNormal")
fs12:SetHeight(10)
fs12:SetWidth(120)
fs12:SetText("Mail Frame")
fs12:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-390)

local fs12_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs12_s_inbox:SetWidth(30)
fs12_s_inbox:SetScale(0.9)
fs12_s_inbox:SetHeight(10)
fs12_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -435)
fs12_s_inbox:SetMaxLetters(3)
fs12_s_inbox:EnableKeyboard(true)
fs12_s_inbox:SetFontObject("GameFontNormal")
fs12_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs12_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs12_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs12_a_inbox:SetWidth(30)
fs12_a_inbox:SetScale(0.9)
fs12_a_inbox:SetHeight(10)
fs12_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -435)
fs12_a_inbox:SetMaxLetters(3)
fs12_a_inbox:EnableKeyboard(true)
fs12_a_inbox:SetFontObject("GameFontNormal")
fs12_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs12_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs13 = guiFrame:CreateFontString(nil,"OVERLAY")
fs13:SetFontObject("GameFontNormal")
fs13:SetHeight(10)
fs13:SetWidth(120)
fs13:SetText("Taxi Frame")
fs13:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-420)

local fs13_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs13_s_inbox:SetWidth(30)
fs13_s_inbox:SetScale(0.9)
fs13_s_inbox:SetHeight(10)
fs13_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -467)
fs13_s_inbox:SetMaxLetters(3)
fs13_s_inbox:EnableKeyboard(true)
fs13_s_inbox:SetFontObject("GameFontNormal")
fs13_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs13_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs13_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs13_a_inbox:SetWidth(30)
fs13_a_inbox:SetScale(0.9)
fs13_a_inbox:SetHeight(10)
fs13_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -467)
fs13_a_inbox:SetMaxLetters(3)
fs13_a_inbox:EnableKeyboard(true)
fs13_a_inbox:SetFontObject("GameFontNormal")
fs13_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs13_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs14 = guiFrame:CreateFontString(nil,"OVERLAY")
fs14:SetFontObject("GameFontNormal")
fs14:SetHeight(10)
fs14:SetWidth(120)
fs14:SetText("Trade Frame")
fs14:SetPoint("TOPLEFT",guiFrame,"TOPLEFT",0,-450)

local fs14_s_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs14_s_inbox:SetWidth(30)
fs14_s_inbox:SetScale(0.9)
fs14_s_inbox:SetHeight(10)
fs14_s_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 170, -500)
fs14_s_inbox:SetMaxLetters(3)
fs14_s_inbox:EnableKeyboard(true)
fs14_s_inbox:SetFontObject("GameFontNormal")
fs14_s_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs14_s_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

local fs14_a_inbox  =  CreateFrame("Editbox", nil,guiFrame)
fs14_a_inbox:SetWidth(30)
fs14_a_inbox:SetScale(0.9)
fs14_a_inbox:SetHeight(10)
fs14_a_inbox:SetPoint("TOPLEFT", guiFrame, "TOPLEFT", 330, -500)
fs14_a_inbox:SetMaxLetters(3)
fs14_a_inbox:EnableKeyboard(true)
fs14_a_inbox:SetFontObject("GameFontNormal")
fs14_a_inbox:SetBackdrop({bgFile = "Interface/Buttons/WHITE8x8", insets = { left = 0, right = 0, top = 0, bottom = 0 }}) 
fs14_a_inbox:SetBackdropColor(0.5,0.5,0.5,0.5)

--end--


scale1 = "1.0"
scale2= "1.0"
scale3= "1.0"
scale4= "1.0"
scale5 = "1.0"
scale6 = "1.0"
scale7 = "1.0"
scale8 = "1.0"
scale9 = "1.0"
scale10 = "1.0"
scale11 = "1.0"
scale12 = "1.0"
scale13 = "1.0"
scale14 = "1.0"


alpha1 = "1.0"
alpha2= "1.0"
alpha3= "1.0"
alpha4= "1.0"
alpha5 = "1.0"
alpha6 = "1.0"
alpha7 = "1.0"
alpha8 = "1.0"
alpha9 = "1.0"
alpha10 = "1.0"
alpha11 = "1.0"
alpha12 = "1.0"
alpha13 = "1.0"
alpha14 = "1.0"





e=0
p=0

frame:RegisterEvent("ADDON_LOADED")
SLASH_FREESCALE1 = "/freescale"
SLASH_FREESCALE2 = "/fs"
FREESCALE_UpdateInterval = 1.0


SlashCmdList["FREESCALE"] = function(param)
if (not param) or (param == "") then
		guiFrame:Show()
		
		return	

end
end

function SetIt()

scale1 = fs1_s_inbox:GetText()
scale2=  fs2_s_inbox:GetText()
scale3=  fs3_s_inbox:GetText()
scale4=   fs4_s_inbox:GetText()
scale5 =  fs5_s_inbox:GetText()
scale6 =   fs6_s_inbox:GetText()
scale7 =   fs7_s_inbox:GetText()
scale8 =   fs8_s_inbox:GetText()
scale9 =   fs9_s_inbox:GetText()
scale10 =   fs10_s_inbox:GetText()
scale11 =   fs11_s_inbox:GetText()
scale12 =   fs12_s_inbox:GetText()
scale13 =   fs13_s_inbox:GetText()
scale14 =   fs14_s_inbox:GetText()


alpha1 = fs1_a_inbox:GetText()
alpha2=  fs2_a_inbox:GetText()
alpha3=  fs3_a_inbox:GetText()
alpha4=  fs4_a_inbox:GetText()
alpha5 =  fs5_a_inbox:GetText()
alpha6 =  fs6_a_inbox:GetText()
alpha7 =  fs7_a_inbox:GetText()
alpha8 =  fs8_a_inbox:GetText()
alpha9 =  fs9_a_inbox:GetText()
alpha10 =  fs10_a_inbox:GetText()
alpha11 = fs11_a_inbox:GetText()
alpha12 =  fs12_a_inbox:GetText()
alpha13 =  fs13_a_inbox:GetText()
alpha14 =  fs14_a_inbox:GetText()
e=0

end

function frame:OnUpdate()

	if e== 0 then
		e=1
		svolume = GetCVar("Sound_MasterVolume")
		SetCVar("Sound_MasterVolume", 0)
		ToggleTalentFrame ()
		ToggleTalentFrame ()
		p = time()
		
		
		fs1_s_inbox:Insert(scale1)
		fs2_s_inbox:Insert(scale2)
		fs3_s_inbox:Insert(scale3)
		fs4_s_inbox:Insert(scale4)
		fs5_s_inbox:Insert(scale5)
		fs6_s_inbox:Insert(scale6)
		fs7_s_inbox:Insert(scale7)
		fs8_s_inbox:Insert(scale8)
		fs9_s_inbox:Insert(scale9)
		fs10_s_inbox:Insert(scale10)
		fs11_s_inbox:Insert(scale11)
		fs12_s_inbox:Insert(scale12)
		fs13_s_inbox:Insert(scale13)
		fs14_s_inbox:Insert(scale14)
		
		
		fs1_a_inbox:Insert(alpha1)
		fs2_a_inbox:Insert(alpha2)
		fs3_a_inbox:Insert(alpha3)
		fs4_a_inbox:Insert(alpha4)
		fs5_a_inbox:Insert(alpha5)
		fs6_a_inbox:Insert(alpha6)
		fs7_a_inbox:Insert(alpha7)
		fs8_a_inbox:Insert(alpha8)
		fs9_a_inbox:Insert(alpha9)
		fs10_a_inbox:Insert(alpha10)
		fs11_a_inbox:Insert(alpha11)
		fs12_a_inbox:Insert(alpha12)
		fs13_a_inbox:Insert(alpha13)
		fs14_a_inbox:Insert(alpha14)
		
	 end
	 

	 
	 if(time()  >= p +2) then
		SetCVar("Sound_MasterVolume", svolume)
	 end
	 
	
	FriendsFrame:SetScale(scale1)
	PaperDollFrame:SetScale(scale2)
	ReputationFrame:SetScale(scale2)
	SkillFrame:SetScale(scale2)
	PVPFrame:SetScale(scale2)
	PlayerTalentFrame:SetScale(scale3)
	RaidInfoFrame:SetScale(scale4)
	GameMenuFrame:SetScale(scale5)
	LFGParentFrame:SetScale(scale6)
	SpellBookFrame:SetScale(scale7)
	QuestLogFrame:SetScale(scale8)
	
	FriendsFrame:SetAlpha(alpha1)
	PaperDollFrame:SetAlpha(alpha2)
	ReputationFrame:SetAlpha(alpha2)
	SkillFrame:SetAlpha(alpha2)
	PVPFrame:SetAlpha(alpha2)
	PlayerTalentFrame:SetAlpha(alpha3)
	RaidInfoFrame:SetAlpha(alpha4)
	GameMenuFrame:SetAlpha(alpha5)
	LFGParentFrame:SetAlpha(alpha6)
	SpellBookFrame:SetAlpha(alpha7)
	QuestLogFrame:SetAlpha(alpha8)
	
	
	

end
function frame:OnEvent(event, ...)
	if event == "BANKFRAME_OPENED" then

		BankFrame:SetScale(scale9)
		BankFrame:SetAlpha(alpha9)
	
	end
	if event == "TRADE_SKILL_SHOW" then
	
		TradeSkillFrame:SetScale(scale10)
		TradeSkillFrame:SetAlpha(alpha10)
	
	end
	if event == "GUILDBANKFRAME_OPENED" then
		GuildBankFrame:SetScale(scale11)
		GuildBankFrame:SetAlpha(alpha11)

	end
	if event ==  "MAIL_INBOX_UPDATE" then
		MailFrame:SetScale(scale12)
		MailFrame:SetAlpha(alpha12)
		
	end
	if event == "TAXIMAP_OPENED" then
		TaxiFrame:SetScale(scale13)
		TaxiFrame:SetAlpha(alpha13)
		

	end
	if event == "TRADE_SHOW" then
		TradeFrame:SetScale(scale14)
		TradeFrame:SetAlpha(alpha14)

	end

end
	
frame:SetScript("OnUpdate", frame.OnUpdate)
frame:SetScript("OnEvent", frame.OnEvent)